﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;

namespace RuoTeng.Win32
{   
    class Sys
    {
        public enum SystemMetrics
        {
            SM_CXSCREEN = 0,
            SM_CYSCREEN = 1
        }

     /// <summary>
     /// 【Win32 API】 用于得到被定义的系统数据或者系统配置信息. 
     /// </summary>
     /// <param name="nIndex"></param>
     /// <returns></returns>
        [DllImport("user32.dll", EntryPoint = "GetSystemMetrics")]
        public static extern int GetSystemMetrics(SystemMetrics nIndex);

    /// <summary>
    ///【Win32 API】 出某个窗口的创建者（线程或进程），返回创建者的标志
    /// </summary>
    /// <param name="hwnd">窗口句柄</param>
    /// <param name="processId">进程ID</param>
    /// <returns></returns>  
        [DllImport("user32.dll", EntryPoint = "GetWindowThreadProcessId")]
        public static extern int GetWindowThreadProcessId(IntPtr hWnd, out IntPtr processId);
       
    }
}
